use axum::Router;
use axum::routing::{delete, get, post};

pub mod sys_user;

pub fn system_api() -> Router {
    Router::new()
        .nest("/user", sys_user_api())
}

pub fn sys_user_api() -> Router {
    Router::new()
        .route("/page", get(sys_user::page))
        .route("/add", post(sys_user::add))
        .route("/update", post(sys_user::update))
        .route("/delete/:id", delete(sys_user::delete))
        .route("/delete_all", delete(sys_user::delete_all))
}